import Vue from 'vue'
import VueRouter from 'vue-router'
import home from '../views/home.vue'

Vue.use(VueRouter)

const routes = [
  {
    path:"/",
    name:"login",
    component:()=>import('../views/login.vue')
  },
  {
    path:"/thema",
    name:"thema",
    component:()=>import('../components/common/theme.vue'),
    meta:{
      title:"基础表格"
    }
  },
  {
    path: '/home',
    name: 'home',
    component: home,
    children: [
      {
        path: '/edit_deatil',
        name: 'edit_deatil',
        component: () => import('../views/edit_deatil.vue'),
        meta:{title:"订单详情"}
      },
      {
        path: '/category',
        name: 'category',
        component: () => import('../views/category.vue'),
        meta:{title:"添加品类页"}
      },
      {
        path: '/add_dity',
        name: 'add_dity',
        component: () => import('../views/add_dity.vue'),
        meta:{title:"添加商品页"}
      },
      {
        path: '/edit',
        name: 'edit',
        component: () => import('../views/edit.vue'),
        meta:{title:"修改商品页"}
      },
      {
        path: '/detail',
        name: 'detail',
        component: () => import('../views/detail.vue'),
        meta:{title:"查询页"}
      },
      {
        path: '/page',
        name: 'page',
        component: () => import('../views/page.vue'),
        meta:{title:"系统首页"}
      },
      {
        path: '/user',
        name: 'user',
        component: () => import('../views/user.vue'),
        meta:{title:"系统首页"}
      },
      {
        path: '/from',
        name: 'from',
        component: () => import('../views/from.vue'),
        meta:{title:"用户列表"}
      },
      {
        path: '/tab',
        name: 'tab',
        component: () => import('../views/tab.vue'),
        meta:{title:"商品管理"}
      },
      {
        path: '/basis',
        name: 'basis',
        component: () => import('../views/basis.vue'),
        meta:{title:"基础表单"}
      },
      {
        path:"/relevant_1",
        name:"relevant_1",
        component:()=> import('../views/relevant_1.vue'),
        meta:{title:"订单管理"}
      },
      {
        path:"/relevant_2",
        name:"relevant_2",
        component:()=> import('../views/relevant_2.vue'),
        meta:{title:"选项2"}
      },
      {
        path:"/earch",
        name:"earch",
        component:()=> import('../views/earth.vue'),
        meta:{title:"百度地图"}
      }

    ]
  },



]

const router = new VueRouter({
  mode: 'history',
  base: process.env.BASE_URL,
  routes
})

export default router
